Table Name
Table name could be a single word or a multiple words. Multiple words name must be enclosed by single or double quotes, or brackets [].
Example:
SELECT * FROM "Contact Parts"
You can also use correlation name:
Example:
SELECT DP.PartNo FROM [Detail Parts] DP
Column Name
doogiePIM's SQL supports single-word and multiple-words column names. Multiple words name must be enclosed by single or double quotes, or brackets []. Column names that duplicate SQL keywords are also supported.
Example:
SELECT Orders.[Cust No] FROM Orders
You can also use short correlation name for columns:
Example:
SELECT C.Name AS FullName FROM Contacts C WHERE FullName LIKE 'Bill%'
Comments
You can use comments in SQL queries text to keep remarks or some useful information about the query.
Single-line comments should be started with '--' symbols:
Example:
-- This is a single-line comment
SELECT * FROM Contacts
Another variant of comments is enclosing text into /* and */ symbols.
It can be used for temporarily removing of some query parts:
Example:
SELECT * FROM CUSTOMERS
/* WHERE (Name = 'Mike') */
ORDER BY CustNo
Reserved Words
Here is the list of words reserved by doogiePIM's SQL Engine. Some of them are not fully supported, but are reserved for further implementations.
ABSOLUTE
ACTION
ADD
ALL
ALLOCATE
ALTER
AND
ANY
ARE
AS
ASC
ASSERTION
AT
AUTHORIZATION
AVG
BEGIN
BETWEEN
BIT
BIT_LENGTH
BLOBBLOCKSIZE
BLOBCOMPRESSIONLEVEL
BOTH
BY
CASCADE
CASCADED
CASE
CAST
CATALOG
CHAR
CHARACTER
CHAR_LENGTH
CHARACTER_LENGTH
CHECK
CLOSE
COALESCE
COLLATE
COLLATION
COLUMN
COMMIT
CONNECT
CONNECTION
CONSTRAINT
CONSTRAINTS
CONTINUE
CONVERT
CORRESPONDING
COUNT
CREATE
CROSS
CURRENT
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
DATE
DAY
DEALLOCATE
DEC
DECIMAL
DECLARE
DEFAULT
DEFERRABLE
DEFERRED
DELETE
DESC
DESCRIBE
DESCRIPTOR
DIAGNOSTICS
DISCONNECT
DISTINCT
DOMAIN
DOUBLE
DROP
ELSE
END
END-EXEC
ESCAPE
EXCEPT
EXCEPTION
EXEC
EXECUTE
EXISTS
EXTERNAL
EXTRACT
FALSE
FETCH
FIRST
FLOAT
FOR
FOREIGN
FOUND
FROM
FULL
GET
GLOBAL
GO
GOTO
GRANT
GROUP
HAVING
HOUR
IDENTITY
IMMEDIATE
IN
INDEX
INDICATOR
INITIALLY
INNER
INPUT
INSENSITIVE
INSERT
INT
INTEGER
INTERSECT
INTERVAL
INTO
IS
ISOLATION
JOIN
KEY
LANGUAGE
LAST
LASTAUTOINCVALUE
LEADING
LEFT
LEVEL
LIKE
LOCAL
LOWER
MATCH
MAX
MIN
MINUS
MINUTE
MODIFY
MODULE
MONTH
NAMES
NATIONAL
NATURAL
NCHAR
NEW
NEXT
NO
NOCASE
NOT
NULL
NULLIF
NUMERIC
OCTET_LENGTH
OF
ON
ONLY
OPEN
OPTION
OR
ORDER
OUTER
OUTPUT
OVERLAPS
PAD
PARTIAL
PASSWORD
POSITION
PRECISION
PREPARE
PRESERVE
PRIMARY
PRIOR
PRIVILEGES
PROCEDURE
PUBLIC
READ
REAL
REFERENCES
RELATIVE
RESTRICT
REVOKE
RIGHT
ROLLBACK
ROWS
SCHEMA
SCROLL
SECOND
SECTION
SELECT
SESSION
SESSION_USER
SET
SIZE
SMALLINT
SOME
SPACE
SQL
SQLCODE
SQLERROR
SQLSTATE
SUBSTRING
SUM
SYSTEM_USER
TABLE
TEMPORARY
THEN
TIME
TIMESTAMP
TIMEZONE_HOUR
TIMEZONE_MINUTE
TO
TRAILING
TRANSACTION
TRANSLATE
TRANSLATION
TRIM
TRUE
UNION
UNIQUE
UNKNOWN
UPDATE
UPPER
USAGE
USER
USING
VALUE
VALUES
VARCHAR
VARYING
VIEW
WHEN
WHENEVER
WHERE
WITH
WORK
WRITE
YEAR
ZONE
Related Topics